﻿using UnityEngine;
using System.Collections;

public class WorldField : MonoBehaviour {

	public WorldFieldSource[] sources;

	public float getIntensity(Vector3 t) {
		float sum = 0;
		for (int i = 0; i < sources.Length; i++) {
			Vector3 d = (sources[i].transform.position - t);
			sum += sources[i].getIntensity(d.magnitude);
		}
		return sum;
	}

	/*
	void FixedUpdate () {
	
	}*/

}
